package com.luych.toolbox.common.feign.view.data.service;

import com.luych.toolbox.common.enums.DataComparePlanStatus;
import com.luych.toolbox.common.feign.FeignView;
import com.luych.toolbox.common.feign.view.base.service.UserView;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("数据对比计划")
public class DataComparePlanView extends FeignView {

    @ApiModelProperty("数据源1")
    private DataSourceView dataSourceOne;
    @ApiModelProperty("数据源2")
    private DataSourceView dataSourceTwo;
    @ApiModelProperty("描述")
    private String name;
    @ApiModelProperty("CRON表达式")
    private String cron;
    @ApiModelProperty("状态")
    private DataComparePlanStatus status;
    @ApiModelProperty("责任人")
    private UserView owner;

    public DataSourceView getDataSourceOne() {
        return dataSourceOne;
    }

    public String getDataSourceOneId() {
        return dataSourceOne == null ? null : dataSourceOne.getId();
    }

    public void setDataSourceOne(DataSourceView dataSourceOne) {
        this.dataSourceOne = dataSourceOne;
    }

    public DataSourceView getDataSourceTwo() {
        return dataSourceTwo;
    }

    public String getDataSourceTwoId() {
        return dataSourceTwo == null ? null : dataSourceTwo.getId();
    }

    public void setDataSourceTwo(DataSourceView dataSourceTwo) {
        this.dataSourceTwo = dataSourceTwo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public DataComparePlanStatus getStatus() {
        return status;
    }

    public void setStatus(DataComparePlanStatus status) {
        this.status = status;
    }

    public String getStatusValue() {
        return status == null ? null : status.getValue();
    }

    public UserView getOwner() {
        return owner;
    }

    public void setOwner(UserView owner) {
        this.owner = owner;
    }

    public String getOwnerId() {
        return owner == null ? null : owner.getId();
    }
}
